import request from '@/utils/request'

// 查询内容列表
export function listContent(query) {
  return request({
    url: '/tzai/content/list',
    method: 'get',
    params: query
  })
}

// 查询内容详细
export function getContent(contentId) {
  return request({
    url: '/tzai/content/' + contentId,
    method: 'get'
  })
}

// 删除内容
export function delContent(contentId) {
  return request({
    url: '/tzai/content/' + contentId,
    method: 'delete'
  })
}

// 根据文章ID和语言查询内容
export function getArticleContent(articleId, language) {
  return request({
    url: `/tzai/content/article/${articleId}`,
    method: 'get',
    params: { language }
  })
}
